package com.wit.service.impl;

import java.util.List;

import com.wit.dao.ClientDao;
import com.wit.po.Client;
import com.wit.po.Contactman;
import com.wit.service.ClientService;

public class ClientServiceImpl implements ClientService {

	ClientDao clientDao;
	
	
	public boolean addClient(Client client) {
		
		return clientDao.addClient(client);
	}

	
	public Client getClientById(String clientId) {
		
		return clientDao.getClientById(clientId);
	}

	
	public List<Client> getClientList(int pageNumber, int pageSize) {
		
		return clientDao.getClientList(pageNumber, pageSize);
	}

	
	public boolean isClientRemovable(String clientId) {
		
		return clientDao.isClientRemovable(clientId);
	}

	
	public boolean removeClient(Client client) {
		
		return clientDao.removeClient(client);
	}

	
	public boolean updateClient(Client client) {
		
		return clientDao.updateClient(client);
	}

	
	public List<Client> getClientList(Client client, Integer pageNumber,
			Integer pageSize) {
		
		return clientDao.getClientList(client,pageNumber, pageSize);
	}

	
	public int getTotalAmount(Client client) {
		
		return clientDao.getTotalAmount(client);
	}

	
	public List<Contactman> getContactListByClientId(String clientId) {
		
		return clientDao.getContactListByClientId(clientId);
	}
	
	/************************** Getters and Setters *****************************/
	
	public ClientDao getClientDao() {
		return clientDao;
	}

	public void setClientDao(ClientDao clientDao) {
		this.clientDao = clientDao;
	}

}
